package com.unitd.modules.sys.entity;

import com.unitd.frame.mybatis.core.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @desc 机构角色关联信息
 * @filename SysRoleOrg.java
 * @copyright www.unitd.com
 * @author LiangZ
 * @version 1.0
 * @date 2017-05-06
 */
@Table(name = "sys_role_org")
public class SysRoleOrg extends BaseEntity {

	@Column(name = "role_id")
	private String roleId;
	@Column(name = "org_no")
	private String orgNo;

	/**
	 * @desc 构造方法 SysRoleOrg
	 */
	public SysRoleOrg(String roleId, String orgNo) {
		this.roleId = roleId;
		this.orgNo = orgNo;
	}

	/**
	 * @desc 构造方法 SysRoleOrg
	 */
	public SysRoleOrg() {
		super();
	}

	/**
	 * @desc 获取主键ID
	 * @return
	 */
	@Override
	public String getId() {
		return roleId + orgNo;
	}

	/**
	 * @return role_id
	 */
	public String getRoleId() {
		return roleId;
	}

	/**
	 * @param roleId
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	/**
	 * @return org_no
	 */
	public String getOrgNo() {
		return orgNo;
	}

	/**
	 * @param orgNo
	 */
	public void setOrgNo(String orgNo) {
		this.orgNo = orgNo == null ? null : orgNo.trim();
	}
}